#include <stdio.h>
#include <string.h>

int main () {
    char s[] = "hello world";
    printf("strlen(s) = %d, sizeof(s) = %d\n", strlen(s), sizeof(s));
    s[5] = '\0';
    printf("strlen(s) = %d, sizeof(s) = %d\n", strlen(s), sizeof(s));
    

    char s2[20] = "##############";
    char s3[20] = "##########";
    strcpy(s2, s);
    strncpy(s3, s, 5);
    // s3[5] = '\0';
    printf("s2 = %s\n", s2);
    printf("s3 = %s\n", s3);

    char s4[20] = "hi";
    strcat(s4, s);
    printf("s4 = %s\n", s4);
    strncat(s4, s, 5);
    printf("s4 = %s\n", s4);

    printf("strcmp(s, s2) = %d\n", strcmp(s, s2));    
    printf("strcmp(s, s3) = %d\n", strcmp(s, s3));    

    return 0;
}